package com.fourth.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;
import java.util.Date;

/**
 * ClassName: BaseModel
 * description: 基础类 包含创建时间和更新时间
 * @author wsy
 * @Date: 2022/11/17 21:50
 * @since JDK 1.8
 */
public class BaseModel implements Serializable{

    @TableField(value = "create_time",insertStrategy = FieldStrategy.NOT_NULL)
    protected Date createTime;
    @TableField(value = "update_time",updateStrategy = FieldStrategy.NOT_NULL)
    protected Date updateTime;

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "BaseModel{" +
                "createTime=" + createTime +
                ", updateTime=" + updateTime +
                '}';
    }
}
